\(\int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx\) [201]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 22, antiderivative size = 298 \[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\frac {\sqrt {c+a^2 c x^2}}{8 a^3}-\frac {\left (c+a^2 c x^2\right )^{3/2}}{12 a^3 c}+\frac {x \sqrt {c+a^2 c x^2} \arctan (a x)}{8 a^2}+\frac {1}{4} x^3 \sqrt {c+a^2 c x^2} \arctan (a x)+\frac {i c \sqrt {1+a^2 x^2} \arctan (a x) \arctan \left (\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{4 a^3 \sqrt {c+a^2 c x^2}}-\frac {i c \sqrt {1+a^2 x^2} \operatorname {PolyLog}\left (2,-\frac {i \sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{8 a^3 \sqrt {c+a^2 c x^2}}+\frac {i c \sqrt {1+a^2 x^2} \operatorname {PolyLog}\left (2,\frac {i \sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{8 a^3 \sqrt {c+a^2 c x^2}} \]

[Out]

-1/12*(a^2*c*x^2+c)^(3/2)/a^3/c+1/4*I*c*arctan(a*x)*arctan((1+I*a*x)^(1/2)/(1-I*a*x)^(1/2))*(a^2*x^2+1)^(1/2)/
a^3/(a^2*c*x^2+c)^(1/2)-1/8*I*c*polylog(2,-I*(1+I*a*x)^(1/2)/(1-I*a*x)^(1/2))*(a^2*x^2+1)^(1/2)/a^3/(a^2*c*x^2
+c)^(1/2)+1/8*I*c*polylog(2,I*(1+I*a*x)^(1/2)/(1-I*a*x)^(1/2))*(a^2*x^2+1)^(1/2)/a^3/(a^2*c*x^2+c)^(1/2)+1/8*(
a^2*c*x^2+c)^(1/2)/a^3+1/8*x*arctan(a*x)*(a^2*c*x^2+c)^(1/2)/a^2+1/4*x^3*arctan(a*x)*(a^2*c*x^2+c)^(1/2)

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {5066, 5072, 267, 5010, 5006, 272, 45} \[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\frac {x \arctan (a x) \sqrt {a^2 c x^2+c}}{8 a^2}+\frac {1}{4} x^3 \arctan (a x) \sqrt {a^2 c x^2+c}+\frac {i c \sqrt {a^2 x^2+1} \arctan (a x) \arctan \left (\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{4 a^3 \sqrt {a^2 c x^2+c}}-\frac {i c \sqrt {a^2 x^2+1} \operatorname {PolyLog}\left (2,-\frac {i \sqrt {i a x+1}}{\sqrt {1-i a x}}\right )}{8 a^3 \sqrt {a^2 c x^2+c}}+\frac {i c \sqrt {a^2 x^2+1} \operatorname {PolyLog}\left (2,\frac {i \sqrt {i a x+1}}{\sqrt {1-i a x}}\right )}{8 a^3 \sqrt {a^2 c x^2+c}}-\frac {\left (a^2 c x^2+c\right )^{3/2}}{12 a^3 c}+\frac {\sqrt {a^2 c x^2+c}}{8 a^3} \]

[In]

Int[x^2*Sqrt[c + a^2*c*x^2]*ArcTan[a*x],x]

[Out]

Sqrt[c + a^2*c*x^2]/(8*a^3) - (c + a^2*c*x^2)^(3/2)/(12*a^3*c) + (x*Sqrt[c + a^2*c*x^2]*ArcTan[a*x])/(8*a^2) +
 (x^3*Sqrt[c + a^2*c*x^2]*ArcTan[a*x])/4 + ((I/4)*c*Sqrt[1 + a^2*x^2]*ArcTan[a*x]*ArcTan[Sqrt[1 + I*a*x]/Sqrt[
1 - I*a*x]])/(a^3*Sqrt[c + a^2*c*x^2]) - ((I/8)*c*Sqrt[1 + a^2*x^2]*PolyLog[2, ((-I)*Sqrt[1 + I*a*x])/Sqrt[1 -
 I*a*x]])/(a^3*Sqrt[c + a^2*c*x^2]) + ((I/8)*c*Sqrt[1 + a^2*x^2]*PolyLog[2, (I*Sqrt[1 + I*a*x])/Sqrt[1 - I*a*x
]])/(a^3*Sqrt[c + a^2*c*x^2])

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5006

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Simp[-2*I*(a + b*ArcTan[c*x])*(
ArcTan[Sqrt[1 + I*c*x]/Sqrt[1 - I*c*x]]/(c*Sqrt[d])), x] + (Simp[I*b*(PolyLog[2, (-I)*(Sqrt[1 + I*c*x]/Sqrt[1
- I*c*x])]/(c*Sqrt[d])), x] - Simp[I*b*(PolyLog[2, I*(Sqrt[1 + I*c*x]/Sqrt[1 - I*c*x])]/(c*Sqrt[d])), x]) /; F
reeQ[{a, b, c, d, e}, x] && EqQ[e, c^2*d] && GtQ[d, 0]

Rule 5010

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Dist[Sqrt[1 + c^2*x^2]/Sq
rt[d + e*x^2], Int[(a + b*ArcTan[c*x])^p/Sqrt[1 + c^2*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[e, c^2*
d] && IGtQ[p, 0] &&  !GtQ[d, 0]

Rule 5066

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_)*Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Simp[(f*x)^(m
 + 1)*Sqrt[d + e*x^2]*((a + b*ArcTan[c*x])/(f*(m + 2))), x] + (Dist[d/(m + 2), Int[(f*x)^m*((a + b*ArcTan[c*x]
)/Sqrt[d + e*x^2]), x], x] - Dist[b*c*(d/(f*(m + 2))), Int[(f*x)^(m + 1)/Sqrt[d + e*x^2], x], x]) /; FreeQ[{a,
 b, c, d, e, f, m}, x] && EqQ[e, c^2*d] && NeQ[m, -2]

Rule 5072

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Simp[
f*(f*x)^(m - 1)*Sqrt[d + e*x^2]*((a + b*ArcTan[c*x])^p/(c^2*d*m)), x] + (-Dist[b*f*(p/(c*m)), Int[(f*x)^(m - 1
)*((a + b*ArcTan[c*x])^(p - 1)/Sqrt[d + e*x^2]), x], x] - Dist[f^2*((m - 1)/(c^2*m)), Int[(f*x)^(m - 2)*((a +
b*ArcTan[c*x])^p/Sqrt[d + e*x^2]), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[e, c^2*d] && GtQ[p, 0] && Gt
Q[m, 1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} x^3 \sqrt {c+a^2 c x^2} \arctan (a x)+\frac {1}{4} c \int \frac {x^2 \arctan (a x)}{\sqrt {c+a^2 c x^2}} \, dx-\frac {1}{4} (a c) \int \frac {x^3}{\sqrt {c+a^2 c x^2}} \, dx \\ & = \frac {x \sqrt {c+a^2 c x^2} \arctan (a x)}{8 a^2}+\frac {1}{4} x^3 \sqrt {c+a^2 c x^2} \arctan (a x)-\frac {c \int \frac {\arctan (a x)}{\sqrt {c+a^2 c x^2}} \, dx}{8 a^2}-\frac {c \int \frac {x}{\sqrt {c+a^2 c x^2}} \, dx}{8 a}-\frac {1}{8} (a c) \text {Subst}\left (\int \frac {x}{\sqrt {c+a^2 c x}} \, dx,x,x^2\right ) \\ & = -\frac {\sqrt {c+a^2 c x^2}}{8 a^3}+\frac {x \sqrt {c+a^2 c x^2} \arctan (a x)}{8 a^2}+\frac {1}{4} x^3 \sqrt {c+a^2 c x^2} \arctan (a x)-\frac {1}{8} (a c) \text {Subst}\left (\int \left (-\frac {1}{a^2 \sqrt {c+a^2 c x}}+\frac {\sqrt {c+a^2 c x}}{a^2 c}\right ) \, dx,x,x^2\right )-\frac {\left (c \sqrt {1+a^2 x^2}\right ) \int \frac {\arctan (a x)}{\sqrt {1+a^2 x^2}} \, dx}{8 a^2 \sqrt {c+a^2 c x^2}} \\ & = \frac {\sqrt {c+a^2 c x^2}}{8 a^3}-\frac {\left (c+a^2 c x^2\right )^{3/2}}{12 a^3 c}+\frac {x \sqrt {c+a^2 c x^2} \arctan (a x)}{8 a^2}+\frac {1}{4} x^3 \sqrt {c+a^2 c x^2} \arctan (a x)+\frac {i c \sqrt {1+a^2 x^2} \arctan (a x) \arctan \left (\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{4 a^3 \sqrt {c+a^2 c x^2}}-\frac {i c \sqrt {1+a^2 x^2} \operatorname {PolyLog}\left (2,-\frac {i \sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{8 a^3 \sqrt {c+a^2 c x^2}}+\frac {i c \sqrt {1+a^2 x^2} \operatorname {PolyLog}\left (2,\frac {i \sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{8 a^3 \sqrt {c+a^2 c x^2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 2.53 (sec) , antiderivative size = 278, normalized size of antiderivative = 0.93 \[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\frac {\sqrt {c \left (1+a^2 x^2\right )} \left (-6 i \operatorname {PolyLog}\left (2,-i e^{i \arctan (a x)}\right )+6 i \operatorname {PolyLog}\left (2,i e^{i \arctan (a x)}\right )-\frac {1}{4} \left (1+a^2 x^2\right )^2 \left (-\frac {2}{\sqrt {1+a^2 x^2}}-6 \cos (3 \arctan (a x))+3 \arctan (a x) \left (-\frac {14 a x}{\sqrt {1+a^2 x^2}}+3 \log \left (1-i e^{i \arctan (a x)}\right )+4 \cos (2 \arctan (a x)) \left (\log \left (1-i e^{i \arctan (a x)}\right )-\log \left (1+i e^{i \arctan (a x)}\right )\right )+\cos (4 \arctan (a x)) \left (\log \left (1-i e^{i \arctan (a x)}\right )-\log \left (1+i e^{i \arctan (a x)}\right )\right )-3 \log \left (1+i e^{i \arctan (a x)}\right )+2 \sin (3 \arctan (a x))\right )\right )\right )}{48 a^3 \sqrt {1+a^2 x^2}} \]

[In]

Integrate[x^2*Sqrt[c + a^2*c*x^2]*ArcTan[a*x],x]

[Out]

(Sqrt[c*(1 + a^2*x^2)]*((-6*I)*PolyLog[2, (-I)*E^(I*ArcTan[a*x])] + (6*I)*PolyLog[2, I*E^(I*ArcTan[a*x])] - ((
1 + a^2*x^2)^2*(-2/Sqrt[1 + a^2*x^2] - 6*Cos[3*ArcTan[a*x]] + 3*ArcTan[a*x]*((-14*a*x)/Sqrt[1 + a^2*x^2] + 3*L
og[1 - I*E^(I*ArcTan[a*x])] + 4*Cos[2*ArcTan[a*x]]*(Log[1 - I*E^(I*ArcTan[a*x])] - Log[1 + I*E^(I*ArcTan[a*x])
]) + Cos[4*ArcTan[a*x]]*(Log[1 - I*E^(I*ArcTan[a*x])] - Log[1 + I*E^(I*ArcTan[a*x])]) - 3*Log[1 + I*E^(I*ArcTa
n[a*x])] + 2*Sin[3*ArcTan[a*x]])))/4))/(48*a^3*Sqrt[1 + a^2*x^2])

Maple [A] (verified)

Time = 0.46 (sec) , antiderivative size = 199, normalized size of antiderivative = 0.67

method result size
default \(\frac {\sqrt {c \left (a x -i\right ) \left (a x +i\right )}\, \left (6 \arctan \left (a x \right ) x^{3} a^{3}-2 a^{2} x^{2}+3 x \arctan \left (a x \right ) a +1\right )}{24 a^{3}}+\frac {\sqrt {c \left (a x -i\right ) \left (a x +i\right )}\, \left (\arctan \left (a x \right ) \ln \left (1+\frac {i \left (i a x +1\right )}{\sqrt {a^{2} x^{2}+1}}\right )-\arctan \left (a x \right ) \ln \left (1-\frac {i \left (i a x +1\right )}{\sqrt {a^{2} x^{2}+1}}\right )-i \operatorname {dilog}\left (1+\frac {i \left (i a x +1\right )}{\sqrt {a^{2} x^{2}+1}}\right )+i \operatorname {dilog}\left (1-\frac {i \left (i a x +1\right )}{\sqrt {a^{2} x^{2}+1}}\right )\right )}{8 a^{3} \sqrt {a^{2} x^{2}+1}}\) \(199\)

[In]

int(x^2*arctan(a*x)*(a^2*c*x^2+c)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/24/a^3*(c*(a*x-I)*(I+a*x))^(1/2)*(6*arctan(a*x)*x^3*a^3-2*a^2*x^2+3*x*arctan(a*x)*a+1)+1/8*(c*(a*x-I)*(I+a*x
))^(1/2)*(arctan(a*x)*ln(1+I*(1+I*a*x)/(a^2*x^2+1)^(1/2))-arctan(a*x)*ln(1-I*(1+I*a*x)/(a^2*x^2+1)^(1/2))-I*di
log(1+I*(1+I*a*x)/(a^2*x^2+1)^(1/2))+I*dilog(1-I*(1+I*a*x)/(a^2*x^2+1)^(1/2)))/a^3/(a^2*x^2+1)^(1/2)

Fricas [F]

\[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\int { \sqrt {a^{2} c x^{2} + c} x^{2} \arctan \left (a x\right ) \,d x } \]

[In]

integrate(x^2*arctan(a*x)*(a^2*c*x^2+c)^(1/2),x, algorithm="fricas")

[Out]

integral(sqrt(a^2*c*x^2 + c)*x^2*arctan(a*x), x)

Sympy [F]

\[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\int x^{2} \sqrt {c \left (a^{2} x^{2} + 1\right )} \operatorname {atan}{\left (a x \right )}\, dx \]

[In]

integrate(x**2*atan(a*x)*(a**2*c*x**2+c)**(1/2),x)

[Out]

Integral(x**2*sqrt(c*(a**2*x**2 + 1))*atan(a*x), x)

Maxima [F]

\[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\int { \sqrt {a^{2} c x^{2} + c} x^{2} \arctan \left (a x\right ) \,d x } \]

[In]

integrate(x^2*arctan(a*x)*(a^2*c*x^2+c)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(a^2*c*x^2 + c)*x^2*arctan(a*x), x)

Giac [F]

\[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\int { \sqrt {a^{2} c x^{2} + c} x^{2} \arctan \left (a x\right ) \,d x } \]

[In]

integrate(x^2*arctan(a*x)*(a^2*c*x^2+c)^(1/2),x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int x^2 \sqrt {c+a^2 c x^2} \arctan (a x) \, dx=\int x^2\,\mathrm {atan}\left (a\,x\right )\,\sqrt {c\,a^2\,x^2+c} \,d x \]

[In]

int(x^2*atan(a*x)*(c + a^2*c*x^2)^(1/2),x)

[Out]

int(x^2*atan(a*x)*(c + a^2*c*x^2)^(1/2), x)